// pinia 随意模块化
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
export const phoneStore = defineStore('phone', () => {
  let phone = ref(18833334444) //state
  let phoneStr = computed(() => { //getters
    return "我的电话是：" + phone.value
  })
  let changePhone = (newPhone) => { //actions
    phone.value = newPhone
  }
  return {
    phone,
    phoneStr,
    changePhone
  }
})